/*
 * @FilePath: /app/app.h
 * @Author: Wilson
 * @Descripttion: 
 * @Date: 2021-08-19 22:26:22
 * @LastEditors: Wilson
 * @LastEditTime: 2021-08-19 23:14:54
 */
#pragma once

#include <list>
#include "plc/PLCClient.h"


namespace app
{
    struct Parameters
    {
        std::string plcIPAddress{"127.0.0.1"};
        std::list<int> readDBList;
    };

    class App
    {
    public:
        static App &Instance();

        bool Init(Parameters parameters);
        bool Release();

        Parameters GetParameters() const { return _parameters; }

    private:
        App(){};
        ~App(){};

        Parameters _parameters;
        std::shared_ptr<plc::PLCClient> _plcClient;
    };
}